package cn.wolfcode.wolf2w.util;

import lombok.Getter;

@Getter
public enum  RedisKeys {

    STRATEGY_THUMBUP("strategy_thumbup",-1L),

    USER_FAVOR_VO("user_favor_vo",-1L),

    VERIFY_CODE("verify_code", Consts.VERIFY_CODE_VAI_TIME * 60L),

    USER_TOKEN("user_token", Consts.VERIFY_CODE_VAI_TIME * 60L),

    STRATEGY_STATIS_VO("strategy_statis_vo", -1L);

    private String prefix;

    private Long time;

    private RedisKeys(String prefix, Long time){

        this.prefix = prefix;
        this.time = time;
    }

    public String join(String...value){

        StringBuilder stringBuilder = new StringBuilder();

        stringBuilder.append(this.prefix);
        for (String s : value) {

            stringBuilder.append(":").append(s);
        }

        return stringBuilder.toString();

    }
}
